import axios from 'axios';
import {  req ,request} from './axiosfun';
// 获取文件
export const getFileId=(params)=>{
    return req("get","/api/Files/GetFileId?id="+params)
}
// 文件列表
export const getFilesInfo=(params)=>{
    return req("get","/api/Files",params)
};
// 新增文件
export const create=(params)=>{
    // console.log(params);
    return req("post","/api/Files/Create",params)
}
// 修改文件
export const update=(params)=>{
    console.log(params);
    return req("put","/api/Files/Update?id="+params.id,params)
}
// 删除文件
export const deleteFile=(params)=>{
    return req("delete","/api/Files/Delete?id="+params)
}
//上传文件
export const Uploader=(params)=>{
    console.log("upload",params)
    return request("post","/api/Files/Uploader",params)
}
export default {
    getFileId,
    getFilesInfo,
    create,
    update,
    deleteFile,
    Uploader
};